package com.example.administrator.eventbusdemo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import org.greenrobot.eventbus.EventBus;

/**
 * Created by sqq on 16/9/30.
 */
public class ResultActivity extends AppCompatActivity {
    private Button button;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result);
        button= (Button) findViewById(R.id.btn_event);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //回传数据  EventBus回传数据   "祝大家国庆快乐"
                EventBus.getDefault().post(new FristEvent("祝大家国庆快乐"));
                finish();
            }
        });
    }
}











